app.controller("projectDetailed",function($scope,$uibModal,$rootScope,del,$state,get,$stateParams,Upload ){
	
	$scope.search=function(i){
		var param={
			id:$stateParams.id
		}
		get.list("projectCost/findOne",param).then(function(e){
			$scope.list=e
		})
		get.list("projectCost/findContract",param).then(function(e){
			$scope.project=e
		})
		get.list("projectCost/findFee",param).then(function(e){
			$scope.fee=e
		})
		get.list("projectCost/findOther",param).then(function(e){
			$scope.other=e
		})
	}

	$scope.pageUp=function(){//跳转页码
       	if ($scope.tj.page>$scope.totalNum) {
       		$scope.tj.page=$scope.totalNum
       	} else if($scope.tj.page<1){
       	$scope.tj.page=null
       	}
       }//pageUp
   $scope.toPage=function(i){//点击跳转
       i=i||$scope.tj.page
       	$scope.search(i)
       	$scope.tj.current=$scope.tj.page;//页码调整
   }//toPage
   if($stateParams.page!=null){
			$scope.tj={
				page:$stateParams.page
			}
		 $scope.toPage($stateParams.page)
	}else{
			$scope.search();
	}
})
